home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5597 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.1 KB

  1. Path: newsstand.tc.umn.edu!thornley
  2. From: thornley@cs.umn.edu (David H. Thornley)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What to do when feof() is NOT feof()
  5. Date: 19 Feb 1996 22:27:47 GMT
  6. Organization: University of Minnesota
  7. Message-ID: <4gath3$abv@epx.cis.umn.edu>
  8. References: <824554814snz@metsys.demon.co.uk> <4g4vpp$52f@spectator.cris.com> <danpop.824614833@rscernix> <4g7t1r$71s@crl13.crl.com>
  9. NNTP-Posting-Host: micro.cs.umn.edu
  10.  
  11. In article <4g7t1r$71s@crl13.crl.com>, James Aragon <aragon@crl.com> wrote:
  12. >Dan Pop (danpop@mail.cern.ch) wrote:
  13. >> In <4g4vpp$52f@spectator.cris.com> aubrey@concentric.net (Aubrey Harrison) writes:
  14. >
  15. >> >I think if you open the file in "text" mode the end of the file is indicated by 
  16. >> >the EOF marker (ASCII 26 I believe). To avoid this you must open the file in 
  17. >> >binary mode. 
  18. >
  19. >> Once again: ignorants and idiots are kindly asked to refrain from posting
  20. >> their thoughts and beliefs to this newsgroup.
  21. >
  22. >> If you don't KNOW what you're talking about, just keep your "mouth" shut.
  23. >> This is comp.lang.c, not talk.rumors.
  24. >
  25. >No wonder so many consider comp.lang.c to be such a hostile place.  Can't 
  26. >someone be corrected--and educated--without referring to "ignorants and 
  27. >idiots."
  28. >
  29. If you've noticed, Dan Pop *never* refers to somebody asking a question
  30. in this manner, only people who post ridiculous answers.  If you ask a
  31. dumb question, the worst that will happen is that you will be politely
  32. asked to post to the appropriate newsgroup (where you've got a better
  33. chance of getting the right answer, anwyay).  If you post ignorant
  34. statements (and the one Dan referred to is ignorant), you may be
  35. misinforming thousands of people.
  36.  
  37. >Sometimes it seems like this newsgroup suffers less from posters who are 
  38. >technically ignorants and idiots than from those who are socially 
  39. >ignorants and idiots.
  40. >
  41. Sometimes it seems like one of the big problems with this newsgroup is the
  42. people who assume that their system, experience, and misconceptions are
  43. as mcuh the truth as K&R2.  There is no shame in technical ignorance,
  44. but there is in misleading others, either because one is malicious or
  45. because one simply doesn't bother to learn something before trying to
  46. teach it.  Dan, among others, puts in a lot of time answering questions
  47. correctly, and I'm willing to cut him much more slack than somebody
  48. who posts nonsense.
  49.  
  50. Ob[ligatory, not fuscated]C:  I'd get real frustrated with a system
  51. that triggered feof() early in the file, and I'd try to see why from
  52. the documentation and any technical support.  I'd also consider a
  53. competitor's product.  Anyway, I rarely use feof(), preferring to
  54. use getc(), fgets(), fread(), whatever, and check the return values.
  55. This usually feels more natural than being told whether or not I've
  56. tried to read past the end of file.  (Now, if feof() would tell me
  57. that I'm *going* to read past EOF, I'd find it a bit more useful.)
  58.  
  59. --
  60. David H. Thornley, known to the Wise as thornley@cs.umn.edu
  61. Disclaimer:  These are not the opinions of the University of Minnesota,
  62.              its Regents, faculty, staff, students, or squirrels.
  63. Datclaimer:  Well, maybe the squirrels.  They're pretty smart.
  64.